<template>
  <div>
    <h1>{{name123}}</h1>
    <button @click='fn'>改父组件的内容</button>
  </div>
</template>
<script>
// @ is an alias to /src
export default {
  props: ["name123"],
  methods: {
    fn() {
      // console.log("hello");
      // this.name123 = "hello";
      // this.$emit("click", "hello");
      this.$emit("update:name123", 8888);
    },
  },
};
</script>
<style lang="less">
</style>